const Actions = {
  READER: "READER"
};

const Container = async opt => {
  console.log(22222);
  await jsChannel.postMessage("Container", opt);
};

class API {
  async main() {
    try {
      // const data = await jsChannel.postMessage(Actions.READER, {
      //   data: "11111"
      // });
      console.log(11111);
      await Container({
        width: 10,
        height: 10,
        child: await Container({ width: 1000, height: 1000 })
      });
      console.log(data);
    } catch (error) {
      console.log(error);
    }
  }
}

const WX = new API();
